﻿using System;
using System.Collections;
using System.Collections.Generic;
using NHibernate;
using Spring.Data.NHibernate.Support;

using VisualAgile.IDAL;
using VisualAgile.Model;
using Spring.Data.NHibernate;
using NHibernate.Engine;

namespace VisualAgile.DAL
{
    public class WorkItemDao : BaseDao<WorkItem>, IWorkItemDao
    {
        protected override HibernateTemplate getBaseDAO()
        {
            return HibernateTemplate;
        }

        public IList FindByStatus(string StatusId)
        {
            return HibernateTemplate.Find("from Story where FeatureID = ?", StatusId);            
        }

        public IList FindByStory(string StoryId)
        {
            return HibernateTemplate.Find("from Story where IterationID = ?", StoryId);            
        }
    }
}